﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Model
{

    [MetadataType(typeof(Sys_Users_Metadata))]
    [DisplayName("系统用户")]
    public partial class Sys_Users
    {
        public Sys_Users()
        {
            this.Id = Guid.NewGuid();
        }
        public class Sys_Users_Metadata
        {
            [ScaffoldColumn(false)]
            public Guid Id { get; set; }

            [DisplayName("用户名")]
            [Required(ErrorMessage = "用户名不能为空")]
            public string UserName { get; set; }

            [DisplayName("密码")]
            [DataType(DataType.Password)]
            [Required(ErrorMessage = "密码不能为空")]
            public string Password { get; set; }

            [DisplayName("更新时间")]
            [Required(ErrorMessage = "更新时间不能为空")]
            public DateTime LastActivityDate { get; set; }

            [DisplayName("说明")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public string Description { get; set; }

            [DisplayName("IP地址")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public string IP { get; set; }

            [DisplayName("Email")]
            [DataType(DataType.EmailAddress)]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public string Email { get; set; }

        }
    }
}
